import request from '@/utils/request'

//查询
export function databaseList(data:any) {
	return request({
		url: '/case/database/list',
		method: 'get',
		params: data
	})
}

//新增
export function addDatabase(data:any) {
	return request({
		url: '/case/database/add',
		method: 'post',
		data
	})
}

//修改
export function databaseUpdate(data:any) {
	return request({
		url: '/case/database/update',
		method: 'post',
		data
	})
}

//删除
export function typeRemove(data:any) {
	return request({
		url: '/case/type/delete',
		method: 'DELETE',
		params: data
	})
}

//删除
export function caseRemove(data:any) {
	return request({
		url: '/case/database/delete',
		method: 'DELETE',
		params: data
	})
}


// 上传封面
export function addimg(data:any) {
  return request({
    url: '/medicine/atlas/upload',
    method: 'POST',
    data,
  });
}


// 查询分类 

export function typeList(data:any) {
	return request({
		url: '/case/type/list',
		method: 'get',
		params: data
	})
}
// 上传图像 


export function upload(data:any) {
  return request({
    headers: {
      'Content-Type': 'multipart/form-data', // 你可以根据实际需要设置其他请求头
    },
    url: '/case/database/upload/case/img',
    method: 'POST',
    data,
  });
}

// 查询图 /case/database/img/list

export function imgList(data:any) {
	return request({
		url: '/case/database/img/list',
		method: 'get',
		params: data
	})
}

// 存储图片列表

export function addImglist(data:any) {
	return request({
		url: '/case/database/add/case/img',
		method: 'POST',
		data
	})
}
